<div class="auth-main">
  <div class="auth-block">
    <h1>聆客会议管理系统</h1>
    <a routerLink="/login" class="auth-link">已经有账号了? 去登录!</a>

    <form [formGroup]="form" (ngSubmit)="onSubmit()" class="my-validate-form">
      <input type="hidden" class="form-control" name="vcode" formControlName="vcode"
             [(ngModel)]="model.vcode" #vcode>

      <div class="form-group row">
        <label class="col-sm-2 control-label">新密码</label>
        <div class="col-sm-10">
          <input type="password" class="form-control" name="password" formControlName="password"
                 [(ngModel)]="model.password" #password [class.my-invalid]="form.errors?.passwordsEqual">
        </div>
      </div>
      <div class="form-group row">
        <label class="col-sm-2 control-label">重复密码</label>
        <div class="col-sm-10">
          <input type="password" class="form-control" name="rePassword" formControlName="rePassword"
                 [(ngModel)]="model.rePassword" #rePassword [class.my-invalid]="form.errors?.passwordsEqual">
        </div>
      </div>

      <div class="form-group row">
        <label class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
          <button type="submit" class="btn btn-primary btn-auth" [disabled]="!form.valid">修改密码</button>
        </div>
      </div>
      <div class="form-group row">
        <label class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
          <div class="validate-errors">
            <div class="validate-error" *ngFor="let msg of formErrors">
              <div>{{ msg }}</div>
            </div>
          </div>
        </div>
      </div>
    </form>
  </div>
</div>
